package com.tanhua.autoconfig.properties;

import com.baidu.aip.face.AipFace;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;

@ConfigurationProperties("tanhua.face")
@Data
public class FaceProperties {
    private String appId;
    private String appKey;
    private String secretKey;

    @Bean
    public AipFace aipFace() {
        AipFace aipFace = new AipFace(appId,appKey,secretKey);
        aipFace.setConnectionTimeoutInMillis(20000);
        aipFace.setSocketTimeoutInMillis(60000);
        return aipFace;
    }
}
